import nodemailer from "nodemailer";
import { EMAIL_HOST, EMAIL_PORT, EMAIL_USER, EMAIL_PASS } from "@/config/settings";

export default async function sendMail({ to, subject, html }) {
  const transporter = nodemailer.createTransport({ host: EMAIL_HOST, port: EMAIL_PORT, secure: true, auth: { user: EMAIL_USER, pass: EMAIL_PASS, }, });
  return transporter.sendMail({ from: `"验证服务" <${EMAIL_USER}>`, to, subject, html, });
}
